package com.wzh.live.service.impl;

import org.springframework.stereotype.Service;
import java.util.Map;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.wzh.common.utils.PageUtils;
import com.wzh.common.utils.Query;

import com.wzh.live.dao.LiveGoodsDao;
import com.wzh.live.entity.LiveGoodsEntity;
import com.wzh.live.service.LiveGoodsService;


@Service("liveGoodsService")
public class LiveGoodsServiceImpl extends ServiceImpl<LiveGoodsDao, LiveGoodsEntity> implements LiveGoodsService {

    @Override
    public PageUtils queryPage(Map<String, Object> params) {
        String liveId = (String) params.get("liveId");
        IPage<LiveGoodsEntity> page = this.page(
                new Query<LiveGoodsEntity>().getPage(params),
                new QueryWrapper<LiveGoodsEntity>().eq("live_id",liveId)
        );

        return new PageUtils(page);
    }

}